package com.changgou.goods.dao;

import com.changgou.goods.pojo.Spec;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface SpecMapper extends Mapper<Spec> {
@Select ("SELECT NAME,OPTIONS FROM\n" +
        " tb_spec WHERE template_id IN \n" +
        " (SELECT template_id  FROM tb_category WHERE NAME =#{categoryName} ) ORDER  BY seq")
    List<Spec> findBrandCategoryName(@Param ("categoryName") String categoryName);
}
